form {
  margin-bottom: 18px;
}

.form-group {
  margin-bottom: 20px;
  select.form-control {
    appearance: none;
    background: transparent;
  }
  .form-text {
    font-size: 13px;
    color: $text-gray-light;
    a {
      color: $text-gray-dark;
    }
    code {
      padding: 0;
      font-weight: bold;
      display: inline;
      background: none;
      font-family: Monaco, Console, monospace;
    }
    strong {
      color: $text-gray-dark;
    }
  }
  .form-text {
    margin-top: 10px;
  }

  .form-error {
    margin-top: 5px;
    color: #ee4343;
  }
}

.control-label {
  display: block;
  margin-bottom: 10px;
  color: #666;
  font-size: 12px;
}
.form-control {
  width: 100%;
  border: 1px solid #d9d9d9;
  padding: 9px 15px;
  height: 36px;
  line-height: 1.5;
  font-size: 13px;
  vertical-align: middle;
  outline: none;
  border-radius: 2px;
  &:focus {
    border-color: #333;
  }
  &[readonly],
  &[disabled] {
    background: #f9f9f9 !important;
    border-color: #d9d9d9 !important;
  }
}
textarea.form-control {
  resize: vertical;
  height: auto;
}

.input-group {
  position: relative;
  display: -ms-flexbox;
  display: flex;
  -ms-flex-wrap: wrap;
  flex-wrap: wrap;
  -ms-flex-align: stretch;
  align-items: stretch;

  .field_with_errors {
    display: -ms-flexbox;
    display: flex;
  }

  .form-control {
    width: auto;
    flex: 1;
    min-width: 300px;
    position: relative;
    margin-bottom: 0;
    border-top-left-radius: 0;
    border-bottom-left-radius: 0;

    &:first-child {
      border-top-right-radius: 0;
      border-bottom-right-radius: 0;
    }
  }

  .input-group-prepend {
    max-width: 50%;
    .input-group-text {
      width: 100%;
      padding: 9px 15px 8px 15px;
      line-height: 1.5;
      color: $text-gray-light;
      background-color: #eaeaea;
      border-radius: 2px 0 0 2px;
      font-size: 13px;
    }
  }

  .form-control {
    display: table-cell;
    margin-bottom: 0;
    border-top-left-radius: 0;
    border-bottom-left-radius: 0;
  }
}

.input-button-group {
  .form-control {
    width: 310px;
    margin-right: 10px;
  }
}

input[type="checkbox"],
input[type="radio"] {
  box-sizing: border-box;
  margin-right: 5px;
}

input[type="checkbox"] {
  margin-bottom: 2px;
  width: 14px;
  height: 14px;
  vertical-align: middle;
  background-image: url("~images/icon-selected.svg");
  background-repeat: no-repeat;
  background-size: contain;
  -webkit-appearance: none;
  outline: none;
  &:checked {
    background-image: url("~images/icon-selected-fill.svg");
  }
  &.checkbox-radius {
    background-image: url("~images/icon-checkbox.svg");
    &:checked {
      background-image: url("~images/icon-checkbox-fill.svg");
    }
  }
}

.form-checkbox {
  padding-left: 30px;
  margin-bottom: 20px;
  vertical-align: middle;
  position: relative;
  line-height: 1.5;
  input[type="radio"] {
    position: absolute;
    left: 1px;
    top: 2px;
  }
  .form-text {
    margin-top: 10px;
    font-size: 12px;
  }
}

.field_with_errors {
  input.form-control,
  textarea.form-control {
    border-color: $danger;
  }
}

.form-input-file {
  input.form-control {
    display: none;
  }
}
